:root {
  --primary-color: #2c5aa0;
  --success-color: #67c23a;
  --warning-color: #e6a23c;
  --danger-color: #f56c6c;
  --info-color: #909399;
  
  /* 专业商务主题 */
  --bg-color: #f5f7fa;
  --bg-color-light: #ffffff;
  --text-color: #303133;
  --text-color-secondary: #606266;
  --border-color: #dcdfe6;
  --sidebar-bg: #304156;
  --sidebar-hover: #263445;
  --header-bg: #ffffff;
  --card-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

#app {
  min-height: 100vh;
  display: flex;
  width: 100%;
}

/* 自定义Element Plus主题 */
.el-menu {
  background-color: var(--sidebar-bg) !important;
  border-right: none !important;
}

.el-menu-item {
  color: #bfcbd9 !important;
  height: 50px !important;
  line-height: 50px !important;
}

.el-menu-item:hover {
  background-color: var(--sidebar-hover) !important;
  color: #ffffff !important;
}

.el-menu-item.is-active {
  background-color: var(--sidebar-hover) !important;
  color: white !important;
}

.el-sub-menu__title {
  color: #bfcbd9 !important;
  height: 50px !important;
  line-height: 50px !important;
}

.el-sub-menu__title:hover {
  background-color: var(--sidebar-hover) !important;
  color: #ffffff !important;
}

/* 确保菜单项文字完整显示 */
.el-menu-item span,
.el-sub-menu__title span {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 100% !important;
  display: inline-block !important;
}

.el-menu-item,
.el-sub-menu__title {
  padding-right: 20px !important;
}

/* 子菜单样式 */
.el-menu--inline .el-menu-item {
  padding-left: 54px !important;
}

.el-card {
  background-color: var(--bg-color-light) !important;
  border-color: var(--border-color) !important;
  color: var(--text-color) !important;
  box-shadow: var(--card-shadow) !important;
  border-radius: 8px !important;
}

.el-table {
  background-color: var(--bg-color-light) !important;
  color: var(--text-color) !important;
}

.el-table th {
  background-color: #fafafa !important;
  color: var(--text-color) !important;
  border-bottom-color: var(--border-color) !important;
}

.el-table td {
  border-bottom-color: var(--border-color) !important;
}

.el-table--striped .el-table__body tr.el-table__row--striped td {
  background-color: #fafafa !important;
}

.el-pagination {
  background-color: var(--bg-color-light) !important;
  color: var(--text-color) !important;
}

.el-pagination .el-pager li {
  background-color: var(--bg-color-light) !important;
  color: var(--text-color) !important;
}

.el-pagination .el-pager li.is-active {
  background-color: var(--primary-color) !important;
  color: white !important;
}

.el-button {
  border-color: var(--border-color) !important;
}

.el-input__inner {
  background-color: var(--bg-color-light) !important;
  border-color: var(--border-color) !important;
  color: var(--text-color) !important;
}

.el-dialog {
  background-color: var(--bg-color-light) !important;
  color: var(--text-color) !important;
}

.el-dialog__header {
  border-bottom-color: var(--border-color) !important;
}

.el-form-item__label {
  color: var(--text-color) !important;
}

/* 响应式布局 */
@media (max-width: 768px) {
  .el-col {
    margin-bottom: 20px;
  }
  
  .el-card {
    margin-bottom: 15px;
  }
}

@media (max-width: 576px) {
  .el-form-item {
    margin-bottom: 15px;
  }
  
  .el-button {
    margin-bottom: 10px;
  }
}

/* 滚动条样式优化 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* 确保内容区域不被侧边栏遮挡 */
.main-content {
  min-height: 100vh;
}

/* 优化表格在小屏幕上的显示 */
@media (max-width: 768px) {
  .el-table {
    font-size: 12px;
  }
  
  .el-table th,
  .el-table td {
    padding: 8px 4px;
  }
}